import { list } from '../system/online';
import request from '@/utils/request';

/**
 * 查询打印模板列表
 *
 */
export const listTemplate = (query?:any) => {
	return request({
		url: '/manage/template/list',
		method: 'get',
		params: query
	});
};

/**
 * 查询打印模板详细
 *
 * @param {string} id
 */
export const getTemplate = (id:string) => request({
	url: '/manage/template/' + id,
	method: 'get'
});


/**
 * 新增打印模板
 *
 * @param {object} data
 */
export const addTemplate = (data:any) => {
	return request({
		url: '/manage/template/add',
		method: 'post',
		data: data
	});
};

/**
 *  修改打印模板
 *
 * @param {object} data
 */
export const updateTemplate = (data:any) => {
	return request({
		url: '/manage/template/edit',
		method: 'put',
		data: data
	});
};

/**
 * 删除打印模板
 *
 * @param {string} id
 */
export const delTemplate = (id:string) => {
	return request({
		url: '/manage/template/' + id,
		method: 'delete'
	});
};
/**
 * 获取所有标签
 */
export const listLabel = () => {
	return request({
		url: '/manage/lable/listAll',
		method: 'post'
	});
};


